home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 21
/
Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso
/
Aminet
/
util
/
rexx
/
rxlistview15.lha
/
rxlistview
/
RXLISTVIEW.readme
< prev
Wrap
Text File
|
1997-08-15
|
2KB
|
78 lines
LISTVIEW.proc 1.5 - by Rolf Rotvel
DESCRIPTION:
A listview procedure (Or rather collection of procedures) for your
Arexx scripts.
INSTALLATION
Include it your Arexx scripts :-).
USAGE
num = listview(width, height, titletext)
The stem variable, viewline, must have the following format:
viewline.0 = number of elements
viewline.1 = first element
viewline.2 = second element...
Returns number of selected element or 0 if requester was cancelled.
Have a look at util/rexx/cliped16.lha for an example of how to
incorporate it in a script.
NAVIGATING LISTVIEW
Use cursor or shift-cursor keys to move up and down.
Return selects an item and escape quits without selecting anything.
If anyone has a way of detecting the use of ctrl as a qualifier then
please tell me. I'd really like to use ctrl-cursorup/down to move to the
top or bottom of the list.
PROGRAMMING NOTES
It's fairly easy to make the listview respond to the HELP being pressed.
Change the main loop like this:
do forever
oldrow = row ; oldvar = var
char = readch('listwin', 1)
select
when char = csi then do
char = readch('listwin', 2)
select
when char = '?~' then do
<help stuff>
end
...
When the listview window has been opened once by your script you cannot
change it's size when you open it again. That is, not unless you change
the line:
if rxlv.init? ~= 1 then call init_rxlistview(argwidth, argheight)
to:
call init_rxlistview(argwidth, argheight)
But this means that the initializing procedure will be called each time
the listview is opened, instead of just the first time.
CREDITS
Thanks to Preben Nielsen for SCREENINFO() procedure.
And to Rick Younie's cy 1.1 for inspiration.
COPYRIGHT
No copyright. Do whatever you want with this.
DISCLAIMER
It's your fault :-)
AUTHOR
Please send any comments or suggestions to me. I can be reached at
2:238/38.2@fidonet or 39:140/110.2@amiganet. Email: rolfr@post4.tele.dk
HISTORY:
1.4 - First release
1.5 - Moved all initialization stuff into seperate procedure called
only the first time listview is opened.
Added highlighting of selected line.
Various bugfixes and optimizations.